<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1" import="org.apak.model.*"
	import="java.util.*"%>
<%
	JspWriter outPrint = pageContext.getOut();
	ArrayList<ServiceNote> listOfEmployeeServiceNotes = (ArrayList<ServiceNote>) request
			.getAttribute("employeeNotes");
	outPrint.println("<div>");
	outPrint.println("<table class=\"tableOfEmployeeNotes\">");
	outPrint.println("<tr><th colspan=\"4\">Workers' notes</th></tr>");
	outPrint.println("<tr><th>#</th><th>First name</th><th>Last name</th><th>Note</th></tr>");
	int counter = 1;
	boolean notesExist = false;
	if(listOfEmployeeServiceNotes.size() > 0) {
		for (ServiceNote note : listOfEmployeeServiceNotes) {
			if(note.getService_order_fk() == (Integer) request.getAttribute("currentServiceOrderNumber")) {
				outPrint.println("<tr>");
				outPrint.println("<td>" + counter + "</td>");
				outPrint.println("<td>" + note.getEmployee_firstname()
						+ "</td>");
				outPrint.println("<td>" + note.getEmployee_lastname() + "</td>");
				outPrint.println("<td>" + note.getNote() + "</td>");
				outPrint.println("</tr>");
				counter++;
				notesExist = true;
			}

		}
	} 
	if (!notesExist) {
		outPrint.println("<tr><td colspan=\"4\">No worker created a note!!!</td></tr>");
	}

	outPrint.println("</table>");
	outPrint.println("<div>");
%>